Write-Host "Preparing electron for offline build..." -ForegroundColor Green

# Create electron cache directory
if (!(Test-Path "electron-cache")) {
    New-Item -ItemType Directory -Path "electron-cache"
}
if (!(Test-Path "electron-cache\28.3.3")) {
    New-Item -ItemType Directory -Path "electron-cache\28.3.3"
}

# Copy electron files to cache
Write-Host "Copying electron files to cache..." -ForegroundColor Yellow
Copy-Item -Path "node_modules\electron\dist\*" -Destination "electron-cache\28.3.3\" -Recurse -Force

# Create electron-builder cache
if (!(Test-Path "electron-builder-cache")) {
    New-Item -ItemType Directory -Path "electron-builder-cache"
}

Write-Host "Electron files prepared for offline build." -ForegroundColor Green
Read-Host "Press any key to continue..." 